-
Notifications
You must be signed in to change notification settings - Fork 645
feat: remove sx prop from Label #6631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: e517b18 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the sx prop from the Label component in the Primer React design system as part of a broader migration strategy. The change simplifies the Label component by removing styled-system support while providing a migration path through the @primer/styled-react package.
Key changes:
- Remove
sxprop support from the core Label component in@primer/react - Create a new styled Label wrapper in
@primer/styled-reactthat preservessxfunctionality - Update build configuration and dependencies to support the new implementation
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/react/src/Label/Label.tsx |
Removes sx prop support and simplifies component implementation |
packages/styled-react/src/index.tsx |
Creates new styled Label component with sx support using Box wrapper |
packages/styled-react/src/polymorphic.ts |
Adds polymorphic component types for better TypeScript support |
packages/styled-react/rollup.config.js |
Updates build config to handle JSX/TSX files |
packages/styled-react/package.json |
Adds React preset for Babel compilation |
.changeset/good-snakes-fix.md |
Documents breaking change for major version release |
|
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
|
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
|
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3165 |
|
🟢 ci completed with status |
|
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
Closes https://github.com/github/primer/issues/5725
Changelog
New
Changed
styled-reactto change how we create a wrapper for styled componentsRemoved
sxfrom LabelRollout strategy
The
sxprop for downstream components is being migrated to pull from@primer/styled-react